/*
 * @Author: 郝奔 1425466221@qq.com
 * @Date: 2024-11-29 10:20:27
 * @LastEditors: 郝奔 1425466221@qq.com
 * @LastEditTime: 2025-01-06 11:05:26
 * @FilePath: /HG-dqbasic_open_platform/src/framework/api/system-info/index.ts
 * @Description: 
 * Copyright (c) 2024-present HBIS Digital Technology Co.,Ltd. All rights reserved. 
 */
import { default as request, cloud } from '@/framework/utils/request'
import { appType,ThemeManageListType,DictFormData,DictEnumManageListType, serverStatus } from './types';
import { ResultData } from '@/framework/api/common';

/**
 * @description: 获取平台名称
 * @return {*}
 */
export function getByAppCode(appCode: string): Promise<ResultData<appType>> {
    return request({
        url: cloud.businessBasic + '/permission/app/getByAppCode',
        method: 'get',
        params: {
            appCode: appCode
        }
    })
}

/**
 * 获取当前主题
 */
export function currentThemeInfo(): Promise<ResultData<ThemeManageListType>> {
    return request({
        url: cloud.sysBasic + '/common/sysConfig/theme/currentThemeInfo',
        method: 'get',
    })
}

/**
 * 获取字典接口
 */
export function getDictData(data: Partial<DictFormData>): Promise<ResultData<DictEnumManageListType[]>> {
    return request({
        url: cloud.sysBasic + '/common/dictEnumManage/getListByCode',
        method: 'post',
        data
    })
}
/**
 * @description: 查看消息服务是否开启
 * @return {*}
 */
export function getServersStatus(): Promise<ResultData<serverStatus>> {
    return request({
        url: `${cloud.sysBasic}/sysConfig/getServersStatus`,
        method: 'get',
    })
}